package cn.huiyunche.base.service.enums;

/**
 * TMS订单状态
 * The enum Tms order operation status enum.
 */
public enum TmsOrderOperationStatusEnum {

    /**
     * Publish tms order operation status enum.
     */
    PUBLISH(10, "发布"),
    /**
     * Pause tms order operation status enum.
     */
    PAUSE(20, "挂起"),
    /**
     * Cancel tms order operation status enum.
     */
    CANCEL(30, "取消");

    private final int value;
    private final String text;

    TmsOrderOperationStatusEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    /**
     * Gets value.
     *
     * @return the value
     */
    public int getValue() {
        return value;
    }

    /**
     * Gets text.
     *
     * @return the text
     */
    public String getText() {
        return text;
    }

    /**
     * Get by value tms order operation status enum.
     *
     * @param value the value
     * @return the tms order operation status enum
     */
    public static TmsOrderOperationStatusEnum getByValue(int value) {
        for (TmsOrderOperationStatusEnum temp : TmsOrderOperationStatusEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
